<if condition="$nanyou_hide_header">

<else />



<!DOCTYPE html>

<html lang="en">

<head><title>{$page_title} - {:C('bianliang._sys_name')}</title>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<meta http-equiv="cache-control" content="no-cache">

<meta http-equiv="expires" content="Thu, 19 Nov 1900 08:52:00 GMT">

    <link rel="shortcut icon" href="__PUBLIC__/ico/favicon.ico">

    <link rel="apple-touch-icon" href="__PUBLIC__/ico/favicon.png">

    <link rel="apple-touch-icon" sizes="72x72" href="__PUBLIC__/ico/favicon-72x72.png">

    <link rel="apple-touch-icon" sizes="114x114" href="__PUBLIC__/ico/favicon-114x114.png">



    <!--LOADING BOOTSTRAP CSS-->

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/bootstrap3.20/css/bootstrap.min.css">

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/bootstrap-table/src/bootstrap-table.css">

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/bootstrap3-editable/css/bootstrap-editable.css">

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/bootstrap-select/bootstrap-select.min.css">

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/bootstrap-progressbar/css/bootstrap-progressbar-3.1.1.min.css">



    <!--LOADING MAIN CSS-->

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/css/themes/style1/nanyou.css" class="default-style">

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/font-awesome/css/font-awesome.min.css">

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/jquery-ui-1.10.4.custom/css/ui-lightness/jquery-ui-1.10.4.custom.min.css"/>

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/animate.css/animate.css">

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/jquery-pace/pace.css">

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/iCheck/skins/all.css">

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/jquery-nestable/nestable.css">

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/bootstrap-daterangepicker/daterangepicker-bs3.css">

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/jqgrid/ui.jqgrid.css?0820">

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/sweetalert/sweetalert1.css">

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/mCustomScrollbar/jquery.mCustomScrollbar.min.css">

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/select2/select2-madmin.css">

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/multi-select/css/multi-select-madmin.css">

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/clockpicker/clockpicker.css">

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/jquery-tablesorter/themes/blue/style-custom.css">

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/css/nocpanel.css?2">

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/calendar/zabuto_calendar.min.css">

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors_no/tagcloud/css/tagcloud.css">



    <!--LOADING STYLE-->

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/css/themes/style1/orange-blue.css" class="default-style"> 

    <if condition="$my_theme">

        <link type="text/css" rel="stylesheet" href="__PUBLIC__/css/themes/style1/{$my_theme}.css" id="theme-change" class="style-change color-change">

    </if>

    <link type="text/css" rel="stylesheet" href="__PUBLIC__/css/style-responsive.css">


    <!--LOADING JQUERY JS-->

    <script src="__PUBLIC__/js/jquery-1.10.2.min.js"></script>

    <script src="__PUBLIC__/js/jquery-migrate-1.2.1.min.js"></script><!-- jquery升级过度插件，应用迁移辅助插件 -->

    <script src="__PUBLIC__/js/jquery-ui.min.js"></script><!-- jquery Ui提供网页用户界面代码库，可视控件 -->

    <script src="__PUBLIC__/vendors/metisMenu/jquery.metisMenu.js"></script><!-- jQuery可折叠菜单插件 -->

    <script src="__PUBLIC__/vendors/slimScroll/jquery.slimscroll.min.js"></script><!-- jQuery滚动条插件 -->

    <script src="__PUBLIC__/vendors/jquery-cookie/jquery.cookie.js"></script><!-- jQuery cookie插件 -->

    <script src="__PUBLIC__/vendors/jquery-pace/pace.min.js"></script><!-- jQuery加载进度动画插件 -->

    <script src="__PUBLIC__/vendors/responsive-tabs/responsive-tabs.js"></script><!-- jQuery响应式tab标签插件 -->

    <script src="__PUBLIC__/vendors/iCheck/icheck.min.js"></script><!-- jQuery单选框复选框美化插件 -->

    <script src="__PUBLIC__/vendors/iCheck/custom.min.js"></script><!-- jquery Ui依赖插件 -->

    <script src="__PUBLIC__/vendors/jquery-validate/jquery.validate.min.js"></script><!-- jQuery验证框架 -->

    <script src="__PUBLIC__/vendors/select2/select2.min.js"></script><!-- jQuery select美化模拟类插件 -->

    <script src="__PUBLIC__/vendors/multi-select/js/jquery.multi-select.js"></script><!-- jQuery开发的美化Select多选插件 -->

    <script src="__PUBLIC__/vendors/mCustomScrollbar/jquery.mousewheel.min.js"></script><!-- jquery自定义滚动条特效插件 -->

    <script src="__PUBLIC__/vendors/mCustomScrollbar/jquery.mCustomScrollbar.min.js"></script><!-- jquery定义滚动条样式插件 -->

    <script src="__PUBLIC__/vendors/jquery-tablesorter/jquery.tablesorter.min.js"></script><!-- jQuery表格排序组件 -->

    <script src="__PUBLIC__/vendors/DataTables/media/js/jquery.dataTables.min.js"></script><!-- jQuery的表格插件 -->

  	<script src="__PUBLIC__/vendors/get_data/template-web.js"></script><!-- 模板引擎 -->
  	
	<script src="__PUBLIC__/vendors/get_data/bootstrap-paginator.js"></script> <!--分页插件--> 
	
	<script src="__PUBLIC__/vendors/get_data/bootstrapValidator.js"></script> <!--表单验证--> 
	
	<!--<script src="__PUBLIC__/vendors/echarts-2.2.7/build/dist/echarts.js"></script>-->
	
	<script src='__PUBLIC__/vendors/get_data/echarts.js'></script>
	
    <!--LOADING BOOTSTRAP JS-->

    <script src="__PUBLIC__/vendors/bootstrap/js/bootstrap.min.js"></script>

    <script src="__PUBLIC__/vendors/bootstrap-hover-dropdown/bootstrap-hover-dropdown.js"></script><!-- bootstrap下拉控件 -->

    <script src="__PUBLIC__/vendors/bootstrap-daterangepicker/daterangepicker.js"></script><!-- bootstrap双日历控件 -->

    <script src="__PUBLIC__/vendors/bootstrap-select/bootstrap-select.min.js"></script><!-- bootstrap下拉框美化插件 -->

    <script src="__PUBLIC__/vendors/bootstrap-progressbar/bootstrap-progressbar.min.js"></script><!-- bootstrap进度条美化插件 -->

    <script src="__PUBLIC__/vendors/DataTables/media/js/dataTables.bootstrap.js"></script><!-- bootstrap表格美化插件 -->

    

    <!--LOADING MAIN SCRIPTS-->

    <script src="__PUBLIC__/js/jquery.menu.js"></script><!-- 系统左侧导航菜单折叠与展开的js文件 -->

    <script src="__PUBLIC__/js/moment.min.js"></script><!-- 日期处理类库 -->

    <script src="__PUBLIC__/vendors/layer/layer.min.js"></script><!-- 弹层控件 -->

    <script src="__PUBLIC__/js/form-validation.js"></script><!-- 表单验证插件 -->

    <script src="__PUBLIC__/vendors/sweetalert/sweetalert.min.js?23"></script><!-- 炫酷的弹出提示框控件 -->

    <script src="__PUBLIC__/vendors/My97DatePicker/WdatePicker.js"></script><!-- 日期控件 -->

    <script src="__PUBLIC__/vendors/clockpicker/clockpicker.js"></script><!-- 时钟控件 -->

    <script src="__PUBLIC__/vendors/jqgrid/jquery.jqGrid.min.js"></script><!-- jqGrid表格控件 -->

    <script src="__PUBLIC__/vendors/jqgrid/i18n/grid.locale-cn.js"></script><!-- jqGrid汉化 -->

    <script src="__PUBLIC__/js/wavesurfer.js"></script><!-- 创建交互式可操作音频可视化控件 -->



    <!--CORE JAVASCRIPT-->

    <script src="__PUBLIC__/js/nocpanel.js?2"></script><!-- 站内消息js文件 -->

    <script src="__PUBLIC__/js/ny.sysCheck.js"></script><!-- 系统检查类js文件 -->

    <script src="__PUBLIC__/js/main.js?14"></script>



<script type="text/javascript">



    //使用notice对象封装消息

    var notice = {

        time: 0,

        title: document.title,

        timer: null,

        // 显示新消息提示执行方法

        show: function () {

            var title = notice.title;

            // 定时器，设置消息切换频率闪烁效果就此产生

            notice.timer = setTimeout(function () {

                notice.time++;

                notice.show();

                if (notice.time % 2 == 0) {

                    //document.title = "您有1个电话呼入···";

                } else {

                    //document.title = title;

                };

            }, 1000);

            return [notice.timer, notice.title];

        },

        // 取消新消息提示方法

        clear: function () {

            clearTimeout(notice.timer);

            document.title = notice.title;

        }

    };





    //需要取消闪烁时调用此方法，单击取消闪烁提示

    function bind() {

        document.onclick = function () {

            notice.clear();

        };

    }





  var mtoggle = "{$my_mtoggle}";

	var _root_path="__ROOT__";

	var _public_path="__PUBLIC__";

    var _my_exten = "{$Think.session.exten}";

    function edit_myself(){

        $.get('{:U('user/edit')}&who=1'+'&id={$Think.session.role_id}&t=' + Math.random(1000), '', function(data){  

            parent.layer.open({

                type: 1,

                //skin: 'layui-layer-rim', //加上边框

                area: ['600px', '560px'], //宽高

                title: '{:L('EDIT')}',

                shadeClose:true, //点击遮罩层 关闭

                content: data

            });

        }) 



    }

/*      function cdr_box_new_phone(data)

      {

    	  //notice.show();

    	  $.post("index.php?m=customer&a=popPage",{phone_num:data.call_phone,call_uid:data.call_uid,t:Math.random(1000)},function(result){

    		  //1才是呼入

    		  var info          = eval(result);

    		  //重新排序

    		  if(info[0].customer_id)

    	      {

    	   	     view_Customer(info[0].customer_id);

    	      }

    		  //并且更新phonelist的新号码的onclick事件

    		  $("#phonelist_"+data.call_uid.replace('.','')).attr('onclick','view_Customer('+info[0].customer_id+')');

    		  phoneslist[0]['customer_id']     = info[0].customer_id;	

    	  });

      }

      sysCheck.set('checkOutOneMenu',{'action':'desktop','func':cdr_box_new_phone});

*/

//wangchao  2016-5-13



$(function(){

    

    //如果当前打开的页面是通话流水，就调用此方法

    if($("#page_title").html() == "通话流水 "){

        notice.show();

    }
    $("#is_predial").css('margin-top','20px');


    $('#phonebox').keydown(function(event){ 

        if(event.keyCode==13){ 

            $("#callout").click(); 

        }

    });

    $('#phonebox').focus(function(){

        $('.page-topsec-inputbox').css('border','1px solid #468847');

        $('#callout').css('color','#468847');

        //绑定键盘回车事件

         

    });

    $('#phonebox').blur(function(){

        $('.page-topsec-inputbox').css('border','1px solid #d8e3ef');

        $('#callout').css('color','grey');

        $(document).keydown(function(event){ 

            if(event.keyCode==13){ 

                return false; 

            }

        }); 

    });

    $('#callout').click(function(){
		var is_check = !!$("#is_predial").attr('checked') ? 1 : 0;
         //console.log(is_check);
        //dial($('#phonebox').val(),'','',is_check);      
       dial($("#phonebox").val().replace(/\s/g,''),'NY_PHONE_JIAMI=0','',is_check);
       console.log($("#phonebox").val().replace(/\s/g,''));
    });





     $('#btn-dnd').on('switch-change', function (e, data) {

        if(data.value){

            setDND(1);

        }else{

            setDND(0); 

        }

    });



     $("#menu_{$page_action_code}").addClass("active")

     $(".nav-second-level .active").parent().closest("li").attr("class","active");

     $(".nav-second-level .active").parent().attr('aria-expanded','true');

	 

	 $("#btn-queue-server-unpause").bind('click',function(){

		 $.get('{:U("monitor/unpause")}'+'&t='+Math.random(1000),'',function(data){

			 alert(data);

		 }); 

	 });

	 $("#btn-queue-server-pause").bind('click',function(){

		  $.get('{:U("monitor/pause")}'+'&t='+Math.random(1000),'',function(data){

			 alert(data);

		 }); 

	 });

	 

	 







    var cur_val = 1;

    if ($.cookie("intro_cookie_index") == cur_val){

        return;

    }

    introJs().setOptions({

        nextLabel: '{:L('NEXT')} &rarr;',

        prevLabel: '&larr; {:L('PREVIOUS')}',

        skipLabel: '{:L('SKIP')}',

        doneLabel: '{:L('COMPLETE')}',

        exitOnOverlayClick:true,

        exitOnEsc: true,

        showBullets:true

    }).oncomplete(function(){

        $.cookie("intro_cookie_index",cur_val,{expires:30});

    }).onexit(function(){

        $.cookie("intro_cookie_index",cur_val,{expires:30});

    }) .start();





})

//发送消息模块

function fasong()

{   

     CloseNoc();

     $.get('{:U("message/add")}'+'&t=' + Math.random(1000), '', function(data){  

       parent.layer.open({

         type: 1,

         area: ['420px', '400px'],

         title: '{:L('SEND_MESSAGE')}',

         shadeClose:true,

         content: data

       });

     }) 

}

var zhannei_mess = '{:L('MESSAGE')}';
var no_new_mess = '{:L('NO_NEW_MESS')}';
var the_window = '{:L('THE_WINDOW')}';
var auto_close = '{:L('AUTO_CLOSE')}';
var know_all = '{:L('I_KNOW_ALL')}';
var loading = '{:L('LOADING')}';
</script>

<style type="text/css">

body {

  font-family: Arial,"Hiragino Sans GB","微软雅黑","黑体-简", Helvetica, sans-serif;

  font-size: 13px;

  line-height: 1.42857143;

  color: #777777;

  background-color: #f0f2f5;

}

</style>

</head>

<body <if condition="$my_mtoggle eq 'shrank' ">class="sidebar-collapsed"</if>>

<div>



    <!--BEGIN BACK TO TOP--><a id="totop" href="javascript:void(0);"><i class="fa fa-angle-up"></i></a><!--END BACK TO TOP-->

    <!--BEGIN TOPBAR-->

    <div id="header-topbar-option-demo" class="page-header-topbar">

        <nav id="topbar" role="navigation" style="margin-bottom: 0; z-index: 2;" class="navbar navbar-default navbar-static-top">

            <div class="navbar-header" data-step="7" data-intro="这仅仅是冰山一角而已,还有好多更炫酷更强大的功能在其中，快来体验吧！" data-position="right">

                <button type="button" data-toggle="collapse" data-target=".sidebar-collapse" class="navbar-toggle"><span class="sr-only">触发导航</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button>

                <a id="logo" href="__APP__?m=index"  target='_blank' class="navbar-brand"><span class="fa fa-rocket"></span><span class="logo-text">{:C('bianliang._sys_name')}</span><span style="display: none" class="logo-text-icon">S</span></a>

            </div>

            <div class="topbar-main" style="background: #FFF">

            <a id="menu-toggle" href="javascript:void(0);" class="hidden-xs"><i class="fa fa-bars text-primary"></i></a>

  			<span class="col-sm-2 navbar-brand" id="page_title">{$page_title} </span>

                      <if condition="$Think.session.exten gt 0">
                        
                        <div class="page-topsec-area">
                            
                              
                            
                            <div class="page-topsec-inputbox">
                                
                                
                                <input id="phonebox" type="text" placeholder="{:L('DIAO_PHONE')}">

                                <a id="callout" href="javascript:;" class="fa fa-phone" ></a>
                                
                               

                            </div>
                              
                        </div>
                         <!-- <div class="page-topsec" style="float: left;width: 80px;height: 50px;line-height: 50px;margin: 0px;">
                         <input type="checkbox" id="is_predial"  class="" value="1" style=""> {:L('TURN_ON_FORECASTING')}
                         </div> -->

                       </if>



                <ul class="nav navbar navbar-top-links navbar-right mbn">



                    <li class=" dropdown openmessagebox" style="cursor:pointer;"><a data-hover="dropdown"  class="dropdown-toggle" data-step="4" data-intro="这里可以收发消息、查看历史消息。还有好多信息都是通过这里推送的。" data-position="left"><i class="fa fa-comment text-primary"></i><span id="message_count" class="badge badge-info"></span></a>

                    </li>





                    <li class="dropdown topbar-user" data-step="5" data-intro="查看、修改个人资料请点这里。" data-position="left"><a data-hover="dropdown"  href="javascript:void(0);"  class="dropdown-toggle"><img src="{$Think.session.pic}" alt="" class="img-responsive img-circle"/>&nbsp;<span class="hidden-xs" style="color: #777777">{$Think.session.name}</span>&nbsp; <if condition="$Think.session.exten gt 0">( {$Think.session.exten} 分机 )</if><span class="caret"></span></a>

                        <ul class="dropdown-menu dropdown-user pull-right">

                            <li><a href="javascript:edit_myself()"><i class="fa fa-user"></i>&nbsp;{:L('INFORMATION')}</a></li>

                            <li><a href="__APP__?m=user&a=logout"><i class="fa fa-key"></i>&nbsp;{:L('EXIT')}</a></li>

                        </ul>

                    </li>



                    <li class="dropdown hidden-xs" ><!--BEGIN THEME SETTING-->

                         <a id="theme-setting" style="background: #FFF" href="javascript:;"

                            data-hover="dropdown" data-step="6" data-intro="这里可以修改边框样式，还有20款皮肤任你选。" data-position="left" class="dropdown-toggle"><i class="fa fa-cogs text-primary"></i></a>

                        <ul class="dropdown-menu dropdown-theme-setting pull-right">

                            <li><h4 class="mtn">{:L('SKIN_STYLE')}</h4><select id="list-style" class="form-control">

                                <option value="style1">{:L('SKIN_SQUARE')}</option>

                                <option value="style2">{:L('SKIN_FILLET')}</option>

                            </select></li>

                            <li><h4 class="mtn">{:L('SKIN_SELECT')}</h4>

                                <ul id="list-color" class="list-unstyled list-inline">

                                    <li data-color="green-dark" data-hover="tooltip" title="Green - Dark"

                                        class="green-dark"></li>

                                    <li data-color="red-dark" data-hover="tooltip" title="Red - Dark"

                                        class="red-dark"></li>

                                    <li data-color="pink-dark" data-hover="tooltip" title="Pink - Dark"

                                        class="pink-dark"></li>

                                    <li data-color="blue-dark" data-hover="tooltip" title="Blue - Dark"

                                        class="blue-dark"></li>

                                    <li data-color="yellow-dark" data-hover="tooltip" title="Yellow - Dark"

                                        class="yellow-dark"></li>

                                    <li data-color="green-grey" data-hover="tooltip" title="Green - Grey"

                                        class="green-grey"></li>

                                    <li data-color="red-grey" data-hover="tooltip" title="Red - Grey"

                                        class="red-grey"></li>

                                    <li data-color="pink-grey" data-hover="tooltip" title="Pink - Grey"

                                        class="pink-grey"></li>

                                    <li data-color="blue-grey" data-hover="tooltip" title="Blue - Grey"

                                        class="blue-grey"></li>

                                    <li data-color="yellow-grey" data-hover="tooltip" title="Yellow - Grey"

                                        class="yellow-grey"></li>

                                    <li data-color="yellow-green" data-hover="tooltip" title="Yellow - Green"

                                        class="yellow-green"></li>

                                    <li data-color="orange-grey" data-hover="tooltip" title="Orange - Grey"

                                        class="orange-grey"></li>

                                    <li data-color="pink-blue" data-hover="tooltip" title="Pink - Blue"

                                        class="pink-blue"></li>

                                    <li data-color="pink-violet" data-hover="tooltip" title="Pink - Violet"

                                        class="pink-violet active"></li>

                                    <li data-color="orange-violet" data-hover="tooltip" title="Orange - Violet"

                                        class="orange-violet"></li>

                                    <li data-color="pink-green" data-hover="tooltip" title="Pink - Green"

                                        class="pink-green"></li>

                                    <li data-color="pink-brown" data-hover="tooltip" title="Pink - Brown"

                                        class="pink-brown"></li>

                                    <li data-color="orange-blue" data-hover="tooltip" title="Orange - Blue"

                                        class="orange-blue"></li>

                                    <li data-color="yellow-blue" data-hover="tooltip" title="Yellow - Blue"

                                        class="yellow-blue"></li>

                                    <li data-color="green-blue" data-hover="tooltip" title="Green - Blue"

                                        class="green-blue"></li>

                                </ul>

                            </li>

                        </ul>

                        <!--END THEME SETTING--></li>

                </ul>

            </div>



        </nav>

</div>

    <!--END TOPBAR-->

    <div id="wrapper">

		 <!--BEGIN 右侧菜单-->

        {:W("Sidebar")}

         <!--END 右侧菜单-->

  

        <div id="info-panel" class="fixed">

            <div class="panel-inner">

            </div>

        </div>

        <!--pannel_1-->

       

        

 

         <!-- 消息弹出框 BEGIN-->

        <div id="new_noc_panel">

           <div id="new_noc_title">

                <span class="noc_iterm_num">&nbsp;<span></span>&nbsp;{:L('UNREAD_MESSAGE')} &nbsp;&nbsp;&nbsp; <a href="javascript:;" onClick="noc_list();" hidefocus="hidefocus">{:L('HISTORY_MESSAGE')}</a>&nbsp;&nbsp;&nbsp; <a style="cursor:pointer;"  href="javascript:;" onClick="fasong();"> {:L('SEND')}</a></span>

                <span class="noc_iterm_close"></span>

           </div> 

           <div id="nocbox_tips"></div>

           <div id="new_noc_list"></div>

           <div class="button">

                <a id="ViewAllNoc" class="btn-white-big" href="javascript:;" hidefocus="hidefocus">{:L('I_KNOW')}</a>&nbsp;&nbsp;

           </div>              

        </div>

        <!--  弹出框 END -->

		<!--BEGIN PAGE WRAPPER-->

        <div id="page-wrapper">

		<!--BEGIN CONTENT-->

		<div class="page-content" id="nanyou-page-content">



</if>     
